package chapter11;

import org.junit.Test;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author : DuJiabao
 * @Date : 2021/2/19 21:46
 * @Project : thinking-in-java
 * @File : null.java
 * @Desc :
 */
public class QueueTest {
  @Test
  public void test() {
    Queue<Integer> queue = new LinkedList<>();
    for (int i = 0; i < 10; i++) {
      queue.offer(i);
    }
    System.out.println(queue.peek());
    while (!queue.isEmpty()) {
      System.out.println(queue.poll());
    }
  }
}
